package com.lingxu.module.database.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lingxu.module.database.entity.Model;
import com.lingxu.module.database.entity.ModelRun;
import com.lingxu.module.database.entity.SourceStcHis;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Title: DataBaseMapper
 * @Package: com.lingxu.module.database.mapper
 * @Author: ysj闫世杰
 * @Email: 1105324813@qq.com
 * @Date: Created in 2023/8/1 16:55
 * @Description:
 * @Version: 1.0.0
 */
@Mapper
public interface UseDataBaseMapper extends BaseMapper<SourceStcHis> {

    IPage<SourceStcHis> findNeedApprovalList(@Param("stcHisPage") Page<SourceStcHis> stcHisPage,@Param("state") String state,
                                             @Param("region") String region);

    int findOnly(SourceStcHis stcHis);

    IPage<ModelRun> findApprovalRedPerson(@Param("model") Page<ModelRun> model, @Param("state") String state);

    int updateApprovalRedPerson(ModelRun modelRun);

    int updateApprovalRedPersonWord(ModelRun mode);

    IPage<Model> findModelApproval(@Param("modelPage") Page<Model> modelPage,
                                   @Param("state") String state,@Param("name") String name);

    int updateModelApproval(@Param("model") Model model,@Param("list") List<String> list);

    SourceStcHis findNeedApprovalDetail(String id);

    String findChildModelIds(@Param("id") String id);
}
